import { createBrowserRouter } from 'react-router-dom'
import routers from './routers'
import MyLayout from '@/layout'
import Login from '@/views/Login'
import Error from '@/views/Error'

const router = createBrowserRouter([
  {
    path: '/Layout',
    element: <MyLayout />,
    children: routers,
  },
  {
    path: '/',
    element: <Login />,
  },
  {
    path: '*',
    element: <Error />,
  },
])
export { router }
